Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 419ff759e88a0ca392ffcb1eb204e9584607ba92


Parents : 1375f40
Author : Mark Qvist <mark@unsigned.io>
Date : 2023-12-05T23:56:45+01:00

Fixed missing announce on fast roam

Changes

1 files changed, 6 insertions(+), 2 deletions(-)


Diff

diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index e7225fb6..0a70a20a 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -2408,6 +2408,7 @@ class SidebandCore():
while True:
time.sleep(SidebandCore.SERVICE_JOB_INTERVAL)
now = time.time()
+ needs_if_change_announce = False
try:
if hasattr(self, "interface_local"):
@@ -2417,6 +2418,8 @@ class SidebandCore():
self.owner_service.take_locks(force_multicast=True)
self.interface_local.carrier_changed = False
last_multicast_lock_check = now
+ needs_if_change_announce = True
+ self.last_if_change_announce = 0
if (self.interface_local != None and len(self.interface_local.adopted_interfaces) == 0) or (self.config["connect_local"] and self.interface_local == None):
if not self.interface_local_adding:
@@ -2428,6 +2431,9 @@ class SidebandCore():
self.interface_local_adding = True
def job():
self.__add_localinterface(delay=60)
+ if self.config["start_announce"] == True:
+ time.sleep(12)
+ self.lxmf_announce(attached_interface=self.interface_local)
threading.Thread(target=job, daemon=True).start()
if (now - last_multicast_lock_check > 120):
@@ -2448,8 +2454,6 @@ class SidebandCore():
# renamed to "auto_announce", which is its current
# meaning.
if self.config["start_announce"] == True:
- needs_if_change_announce = False
-
if hasattr(self, "interface_local") and self.interface_local != None:
have_peers = len(self.interface_local.peers) > 0


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────